package com.ylfstu.abstract_;

public class AbstractExercise01 {
    public static void main(String[] args) {
        Manager manager1 = new Manager("凌飞", 1237, 5000, 10000);
        manager1.work();

    }
}

abstract class Employee {
    private String name;
    private int id;
    private double salary;

    public abstract void work();

    public Employee(String name, int id, double salary) {
        this.name = name;
        this.id = id;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

class Manager extends Employee{
    private double bonus;

    public Manager(String name, int id, double salary, double bonus) {
        super(name, id, salary);
        this.bonus = bonus;
    }

    @Override
    public void work() {
        System.out.println("经理" + super.getName() + "工作中！");
    }
}

class CommonEmployee extends Employee {
    public CommonEmployee(String name, int id, double salary) {
        super(name, id, salary);
    }

    @Override
    public void work() {
        System.out.println("普通员工" + super.getName() + "工作中！");
    }
}